﻿#pragma once

#include "CheckModelTreeCtrl.h"
#include "OperatorListCtrl.h"
#include "CheckItemPropertyGridCtrl.h"

// CCheckModelEditDialog 对话框

class CCheckModelEditDialog : public CDialogEx
{
	DECLARE_DYNAMIC(CCheckModelEditDialog)

public:
	CCheckModelEditDialog(CWnd* pParent = nullptr);   // 标准构造函数
	virtual ~CCheckModelEditDialog();

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_DIALOG_MODEL_EDIT };
#endif
	
protected:
	ck::CheckModel	*m_pModel;

public:
	CString m_strCheckElement;
	CButton m_chkOperator;
	CCheckModelTreeCtrl m_tree;	
	COperatorListCtrl m_list;
	CCheckItemPropertyGridCtrl m_props;

public:
	void	SetModel(ck::CheckModel	*pModel);
	void	UpdateCheckElementText(CString strText);

	void	UpdateCheckItemGrid(ck::CheckItem* pItpCheckItemem);
	void	PopulateOperators(ck::CheckItem* pCheckItem);

protected:
	void	AdjustLayout();

	

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持

	DECLARE_MESSAGE_MAP()
public:
	virtual BOOL OnInitDialog();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnBnClickedOk();
};
